home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / lisp / ilisp / ilisp-inp.el.z / ilisp-inp.el
Encoding:
Text File  |  1998-05-21  |  1.3 KB  |  51 lines

  1. ;;; -*- Mode: Emacs-Lisp -*-
  2.  
  3. ;;; ilisp-inp.el --
  4.  
  5. ;;; This file is part of ILISP.
  6. ;;; Version: 5.8
  7. ;;;
  8. ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
  9. ;;;               1993, 1994 Ivan Vasquez
  10. ;;;               1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
  11. ;;;               1996 Marco Antoniotti and Rick Campbell
  12. ;;;
  13. ;;; Other authors' names for which this Copyright notice also holds
  14. ;;; may appear later in this file.
  15. ;;;
  16. ;;; Send mail to 'ilisp-request@naggum.no' to be included in the
  17. ;;; ILISP mailing list. 'ilisp@naggum.no' is the general ILISP
  18. ;;; mailing list were bugs and improvements are discussed.
  19. ;;;
  20. ;;; ILISP is freely redistributable under the terms found in the file
  21. ;;; COPYING.
  22.  
  23.  
  24.  
  25. ;;;
  26. ;;; ILISP input functions
  27. ;;;
  28.  
  29. ;;;%%Input 
  30. (defun lisp-at-start ()
  31.   "Return the point if you are at the start of an input expression in
  32. an inferior Lisp."
  33.   (save-excursion
  34.     (let ((point (point)))
  35.       (beginning-of-line)
  36.       (comint-skip-prompt)
  37.       (if (= point (point))
  38.       point))))
  39.  
  40. ;;;
  41. (defun lisp-input-start ()
  42.   "Go to the start of the input region."
  43.   (let* ((pmark (process-mark (get-buffer-process (current-buffer)))))
  44.     (if (>= (point) pmark)
  45.     (goto-char pmark)
  46.     (progn 
  47.       (end-of-line)
  48.       (if (re-search-backward comint-prompt-regexp (point-min) 'stay)
  49.           (comint-skip-prompt)
  50.           (point))))))
  51.